<div id="wrapper_container">
    <!-- InstanceBeginEditable name="Hot news option" -->
    <div class="banner_960 w960 mar_left_10"></div>
    <!-- InstanceEndEditable -->
    <div class="w980 left">
        <div id="col_left" class="w650 left pad_left_10">
            <!-- InstanceBeginEditable name="Content col left" -->
            <div id="detail_duthi">
                <div class="title">
                    <h1><?php echo $this->escape($this->articleInfo['title']);?></h1>
                    <p><?php if ( $this->articleInfo['categoryid'] == $this->categoryConfig['none'] ) {?><a class="widget" href="<?php echo BANBE_URL;?>/<?php echo $this->articleInfo['userid'];?>/profile" rel="FPTD_<?php echo $this->articleInfo['userid'];?>?sub=45" target="_blank"></a> <span>|</span> <?php }//end if?> <?php echo $this->DateTimeDiff($this->articleInfo['creation_time']);?> <span>|</span>
                        <label><?php echo $this->articleInfo['total_view'];?></label>
                        lượt xem <span>|</span>
                        <label><a id="totalcommentBlock" href="#comment" onclick="$('#txtComment').focus(); return false;"><?php echo $this->articleInfo['total_comment'];?></a></label>
                        bình luận</p>
                <?php if ( $this->articleInfo['status'] == 1 ) {?>
                    <div>
                        <div class="fb-plugins">
                            <div class="fb-like" data-href="<?php echo BASE_URL_CLUB;?>/index/detail/id/<?php echo $this->articleInfo['articleid'];?>" data-send="false" data-layout="button_count" data-width="73" data-show-faces="false"></div>
                        </div>
                        <div class="google-plugins">
                            <div class="g-plusone" data-size="medium" data-href="<?php echo BASE_URL_CLUB;?>/index/detail/id/<?php echo $this->articleInfo['articleid'];?>"></div>
                        </div>
                        <div class="bb-plugins">
                            <bb:sp-like title="<?php echo $this->escape($this->articleInfo['title']);?>" <?php if ( !empty($this->articleInfo['image']) ) {?>img_src="<?php echo UPLOAD_URL_CLUB.$this->articleInfo['image'];?>"<?php }//end if?> width="200" height="25" like_text="Like" layout="button_count" show_avatar="false"></bb:sp-like>
                        </div>
                    </div>
                <?php }//end if?>
                <?php if ( !$this->scheduleOpen ) {?>
                    <div class="but_binhchon position_right">
                        <a href="javascript:;" onclick="showScheduleClose(); return false;">Bình chọn</a>
                        <span><label><?php echo $this->articleInfo['total_vote'];?></label></span>
                    </div>
                <?php } elseif ( $this->permitVote ) {?>
                    <div id="voteblock1" class="but_binhchon position_right">
                        <?php if ( $this->viewer->userid>0 || isset($_SESSION['userOpenID']) ) {?>
                            <a id="buttonvote1" href="javascript:;" onclick="DetailArticle.vote(<?php echo $this->articleInfo['articleid'];?>); return false;">Bình chọn</a>
                        <?php } else {?>
                            <a id="buttonvote1" href="javascript:;" onclick="DetailArticle.sendVoteWith(); return false;">Bình chọn</a>
                        <?php }//end if?>
                        <span><label id="votevalue1"><?php echo $this->articleInfo['total_vote'];?></label></span>
                    </div>
                <?php } elseif ( $this->isShowVote ) {?>
                    <div class="but_binhchon_none position_right">
                        <a href="javascript:;">Bình chọn</a>
                        <span><label><?php echo $this->articleInfo['total_vote'];?></label></span>
                    </div>
                <?php }//end if?>
                </div>
                <div class="noidung">
                <?php if ( $this->articleInfo['status'] == 2 ) {?>
                    <p class="caution">Bài viết đang chờ kiểm duyệt</p>
                <?php }//end if?>
                    <?php echo $this->articleInfo['content'];?>
                    <div class="vitri_popup_login">
                    <?php if ( !$this->scheduleOpen ) {?>
                        <div class="but_binhchon">
                            <a href="javascript:;" onclick="showScheduleClose(); return false;">Bình chọn</a>
                            <span><label><?php echo $this->articleInfo['total_vote'];?></label></span>
                        </div>
                    <?php } elseif ( $this->permitVote ) {?>
                        <div id="voteblock2" class="but_binhchon">
                            <?php if ( $this->viewer->userid>0 || isset($_SESSION['userOpenID']) ) {?>
                                <a id="buttonvote2" href="javascript:;" onclick="DetailArticle.vote(<?php echo $this->articleInfo['articleid'];?>); return false;">Bình chọn</a>
                            <?php } else {?>
                                <a id="buttonvote2"href="javascript:;" onclick="DetailArticle.sendVoteWith(); return false;">Bình chọn</a>
                            <?php }//end if?>
                            <span><label id="votevalue2"><?php echo $this->articleInfo['total_vote'];?></label></span>
                        </div>
                    <?php } elseif ( $this->isShowVote ) {?>
                        <div class="but_binhchon_none">
                            <a href="javascript:;">Bình chọn</a>
                            <span><label><?php echo $this->articleInfo['total_vote'];?></label></span>
                        </div>
                    <?php }//end if?>
                    </div>
                </div>

             <?php if ( $this->permitComment ) {?>
                <div id="listcommentblock" class="comment">
                    <h2>Thảo luận</h2>
                    <form id="comment" onsubmit="return false;">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td>
                                    <textarea id="txtComment" name="txtComment" cols="" rows="" onfocus="if(this.value=='Ý kiến của bạn')this.value='';" onblur="if(this.value=='')this.value='Ý kiến của bạn';">Ý kiến của bạn</textarea>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                <?php if ( $this->viewer->userid > 0 ) {?>
                                    <input class="reg" id="btnComment" name="btnComment" type="button" value="Đăng ý kiến" onclick="DetailArticle.comment(1);" />
                                <?php } else {?>
                                    <input class="reg" id="btnComment" name="btnComment" type="button" value="Gửi với..." onclick="DetailArticle.sendCommentWith();" />
                                <?php }//end if?>
                                </td>
                            </tr>
                        </table>
                    </form>
                    <!--List comment-->
                    <ul id="commentitem"></ul>
                </div>
                <div id="pagingblock" class="paging" style="display: none;"></div>
            <?php }//end if?>
            </div>
            <!-- InstanceEndEditable -->
        </div>
        <div id="col_right" class="w300 right pad_right_10">
            <!-- InstanceBeginEditable name="Content col Right" -->
        <?php if ( $this->articleInfo['categoryid']==$this->categoryConfig['none'] && $this->scheduleOpen ) {?>
            <div class="banner_300 pad_top_10">
                <a href="<?php echo $this->MakeUrlSite(7, null);?>"><img src="<?php echo IMAGE_URL_CLUB;?>/graphics/banner_2.jpg" align="absmiddle" /></a>
            </div>
        <?php }//end if?>
            <?php echo $this->render('box/detail_right.phtml');?>
            <!-- InstanceEndEditable -->
        </div>
    </div>
</div>

<div id="hide" style="display:none;">
    <div class="wrap_popup_login left_0_top_30" id="id_popup_del_comment">
        <div class="popup_login">
            <p style="color:#F60;">Xác nhận xoá thảo luận</p>
            <a class="close" href="javascript:;"><img src="<?php echo IMAGE_URL_CLUB;?>/icons/icon_close.gif" align="absmiddle" /></a>
            <div class="s2" style="width:390px; text-align:center; padding-bottom:10px; height:70px;">
              <p style="padding-top:10px; padding-bottom:10px;">Bạn có chắc muốn xoá thảo luận này?</p>
              <p>
                  <input class="deletecoment" name="input" type="button" value="Có" onclick="DetailArticle.deleteCommentCallback();" /> <input class="no_deletecoment" name="input" type="button" value="Không" onclick="DetailArticle.cancelDeleteComment();" />
              </p>
            </div>
        </div>
    </div>
    <div class="wrap_popup_login left_0_top_30" id="id_popup_login_vote">
        <div class="popup_login">
            <p>Bạn cần lựa chọn một tài khoản đăng nhập để bình chọn</p>
            <a class="close" href="javascript:;"><img src="<?php echo IMAGE_URL_CLUB;?>/icons/icon_close.gif" align="absmiddle" /></a>
            <div class="s2">
              <ul class="slider-nav">
                    <li class="active"><a href="#a11">Fpt ID <img src="<?php echo CSS_URL_CLUB;?>/images/icons/icon_fpt.gif" align="absmiddle" /></a></li>
                    <li><a href="#a12">Chọn tài khoản khác</a></li>
                </ul>
                <ul class="slider-holder">
                    <li id="a11"></li>
                    <li id="a12">
                        <form action="<?php echo BASE_URL_CLUB;?>/openid/login/article/<?php echo $this->articleInfo['articleid'];?>/" method="get" id="openid_form">
                            <input type="hidden" name="action" value="verify" />
                            <div id="openid_choice">
                                <div id="openid_btns"></div>
                            </div>
                            <div id="openid_input_area">
                                <input id="openid_identifier" name="openid_identifier" type="text" value="http://" />
                                <input id="openid_submit" type="submit" value="Sign-In"/>
                            </div>
                        </form>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<?php if ( $this->viewer->userid <= 0 ) {?>
    <div class="wrap_popup_login left_0_top_30" id="id_popup_login">
        <div class="popup_login">
            <p>Bạn cần lựa chọn một tài khoản đăng nhập để gửi ý kiến</p>
            <a class="close" href="javascript:;"><img src="<?php echo IMAGE_URL_CLUB;?>/icons/icon_close.gif" align="absmiddle" /></a>
            <div class="s2">
              <ul class="slider-nav">
                    <li class="active"><a href="#a9">Guest</a></li>
                    <li><a href="#a10" onclick="DetailArticle.setIFrameFptId('a10', 1);">Fpt ID <img src="<?php echo CSS_URL_CLUB;?>/images/icons/icon_fpt.gif" align="absmiddle" /></a></li>
                </ul>
                <ul class="slider-holder">
                    <li id="a9">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td align="right">Email của bạn:</td>
                                <td>
                                    <input name="emailGuest" id="emailGuest" type="text" />
                                    <span id="errGuestEmail" style="display: none; color: red;"></span>
                                </td>
                              </tr>
                              <tr>
                                <td align="right">Nhập họ tên:</td>
                                <td>
                                    <input name="fullnameGuest" id="fullnameGuest" type="text" />
                                    <span id="errGuestFullName" style="display: none; color: red;"></span>
                                </td>
                              </tr>
                              <tr>
                                <td>&nbsp;</td>
                                <td align="right"><input class="dangnhap" name="btnSendGuest" id="btnSendGuest" type="button" value="Hoàn tất" onclick="DetailArticle.sendCommentGuest('a9');" /></td>
                              </tr>
                          </table>
                    </li>
                    <li id="a10"></li>
                </ul>
            </div>
        </div>
    </div>
<?php }//end if?>
</div>
<script type="text/javascript">
var articleId       = parseInt('<?php echo $this->articleInfo['articleid'];?>');
var articleStatus   = parseInt('<?php echo $this->articleInfo['status'];?>');
var fptIdUrl        = '<?php echo $this->configuration['app']['fptid'];?>';
var refererspC      = '<?php echo urlencode(BASE_URL.'/sso.php?action=iframe&type=function&data=callComment&sdomain=0');?>';
var refererspV      = '<?php echo urlencode(BASE_URL.'/sso.php?action=iframe&type=function&data=callVote&sdomain=0');?>';
var imgPath         = '<?php echo IMAGE_URL;?>';
</script>